package com.myproxyStatic;

public class ZMainTest {

	public static void main(String[] args) {
		//使用继承方式
		SingInterface sing = new Agenter();
		sing.sing();
		
		//使用聚合方式
		Singer singer = new Singer();
		SingInterface sing2 = new Agenter2(singer);
		sing2.sing();
		
		//聚合方式-设置前置或后置操作（这样更灵活）
		Singer singer2 = new Singer();
		HetongAgenter hetongAgenter = new HetongAgenter(singer2);
		JiezhangAgenter jiezhangAgenter = new JiezhangAgenter(hetongAgenter);
		jiezhangAgenter.sing();
	}
}
